#include "mainwindow.h"
#include <DApplication>
#include <QTranslator>
#include <QDebug>
int main(int argc, char *argv[])
{
    DApplication a(argc, argv);
    QTranslator translator;
    translator.load("/usr/share/appimage-installer/translations/appimage-installer_" + QLocale::system().name());
    qDebug()<<QLocale::system().name();
    a.loadTranslator();
    a.installTranslator(&translator);
    a.setProductIcon(QIcon::fromTheme("appimage-installer"));
    a.setProductName("AppImage Installer");
    a.setApplicationVersion("1.0.2");
    Widget w;
    w.show();

    if(QString::fromUtf8(argv[1])!=""){
        w.open(QString::fromUtf8(argv[1]));
    }

    return a.exec();
}
